Using VisualStudio

back to top Move to VS

Renaming a OpenGL VS project by copying the lesson02.cpp to OpenGLdraw.cpp and opening OpenGLdraw.cpp with Visual Studio 6.0
Got 22 link errors!
comparing Project Settings with those for lesson02, the critical things I had to change to get OpenGLdraw project to build and run are:


Move ccurve.cpp and ccurve.h (from ~rossa at www.csm.astate.edu) to a Visual Studio 6.0 "Win32 Application" called ccurve, based on 'a typical "Hello World!" application'. (Replaced the generated ccurve.cpp with the downloaded version; also replaced ccurve.h in the Header Files folder.)

Initial compile error:
fatal error C1010: unexpected end of file while looking for precompiled header directive
Fix: Project Settings → C/C++ tab → Category: Precompiled Headers,
change radio button selection from "Use precompiled header file (.pch)" to "Not using precompiled headers"

After successful compile of ccurve project, I got Link errors:
error LNK2001: unresolved external symbol __beginthreadex
error LNK2001: unresolved external symbol __endthreadex
Fix: Project Settings → C/C++ tab → Category: Code Generation, in choice box "Use run-time library:"
change pull down selection from "Debug Single-Threaded" to "Debug Multitreaded" (or maybe to "Multithreaded" for production release...)

These steps solved the problem: the ccurve project now compiles and runs.

back to top My Other C++ Links